<template>
  <div>
    <van-nav-bar title="城市列表" left-arrow @click-left="$router.back()" />
    <van-index-bar :index-list="indexList">
  <van-index-anchor index="1">当前城市</van-index-anchor>
  <van-cell title="上海" />


  <van-index-anchor index="2">热门城市</van-index-anchor>
  <van-cell title="文本" />
  <van-cell title="文本" />
  <van-cell title="文本" />

</van-index-bar>
  </div>
</template>

<script>
import { getCityList } from '@/api/search'
export default {
   data() {
    return {
      indexList: ['#', '热', "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"],
    };
  },
  async created(){
    const res = await getCityList(1)
    console.log(res);
  }
};
</script>

<style></style>
